package com.colourclash.fruitopia.models 
{
	/**
	 * Model for the individual pieces of fruit
	 * @author Patrick Hammond
	 */
	public class FruitModel 
	{
		private static var nextId:Number = 0;
		
		private var _type:String;
		public function get type():String 
		{
			return _type;
		}
		public function set type(value:String):void 
		{
			_type = value;
		}
		
		private var _row:int;
		public function get row():int 
		{
			return _row;
		}
		public function set row(value:int):void 
		{
			_row = value;
		}		
		
		private var _column:int;		
		public function get column():int 
		{
			return _column;
		}
		public function set column(value:int):void 
		{
			_column = value;
		}
		
		private var _id:Number;		
		public function get id():Number
		{
			return _id;
		}
		
		public var isDestroyed:Boolean;
		
		public function FruitModel(type:String, row:int, column:int, id:Number = NaN) 
		{
			_type = type;
			_row = row;
			_column = column;
			
			if (isNaN(id))
				_id = nextId++;
			else
				_id = id;
		}
		
	}

}